{include file="header.html"}
<script type="text/javascript">
$(function(){
    $('#start_time').datepicker({dateFormat: 'yy-mm-dd'});
    $('#end_time').datepicker({dateFormat: 'yy-mm-dd'});
});
</script>
<div id="rightTop">
    <p>{$lang.coupon}</p>
    <ul class="subnav">
        <li><span>{$lang.manage}</span></li>
    </ul>
</div>
<div class="mrightTop">
    <div class="fontl">
        <form method="get">
            <div class="left">
                <input type="hidden" name="app" value="coupon" />
                <input type="hidden" name="act" value="index" />
                {$lang.store_name}:
                <input class="queryInput" type="text" name="store_name" value="{$smarty.get.store_name|escape}" />
                {$lang.start_time}:<input class="queryInput" type="text" value="{$query.start_time}" id="start_time" name="start_time" class="pick_date" />
                {$lang.end_time}:<input class="queryInput" type="text" value="{$query.end_time}" id="end_time" name="end_time" class="pick_date" />
                <input type="submit" class="formbtn" value="{$lang.query}" />
            </div>
            <!--{if $filtered}-->
            <a class="left formbtn1" href="index.php?app=coupon<!--{if $smarty.get.wait_verify}-->&amp;wait_verify={$smarty.get.wait_verify}<!--{/if}-->">{$lang.cancel_query}</a>
            <!--{/if}-->
        </form>
    </div>
    <div class="fontr">{include file=page.top.html} </div>
</div>
<div class="tdare">
    <table width="100%" cellspacing="0" class="dataTable">
        <!--{if $coupon_list}-->
        <tr class="tatr1">
            <td width="20" class="firstCell"><input type="checkbox" class="checkall" /></td>
            <td class="table-center">{$lang.coupon_name}</td>
            <td class="table-center"><span ectype="order_by" fieldname="store_name">{$lang.store_name}</span></td>
            <td class="table-center"><span ectype="order_by" fieldname="coupon_value">{$lang.coupon_value}</span></td>
            <td class="table-center"><span ectype="order_by" fieldname="min_amount">{$lang.min_amount}</span></td>
            <td class="table-center"><span ectype="order_by" fieldname="if_issue">{$lang.if_issue}</span></td>
            <td class="table-center"><span ectype="order_by" fieldname="start_time">{$lang.start_time}</span></td>
            <td class="table-center"><span ectype="order_by" fieldname="end_time">{$lang.end_time}</span></td>
            <td class="table-center"><span ectype="order_by" fieldname="mall_recommended">{$lang.mall_recommended}</span></td>
            <td class="handler">{$lang.handler}</td>
        </tr>
        <!--{/if}-->
        <!--{foreach from=$coupon_list item=coupon}-->
        <tr class="tatr2">
            <td class="firstCell"><input type="checkbox" class="checkitem" value="{$coupon.coupon_id}" /></td>
            <td class="table-center">{$coupon.coupon_name|escape}</td>

            <td class="table-center">{$coupon.store_name|escape}</td>
            <td class="table-center">{$coupon.coupon_value|escape}</td>
            <td class="table-center">{$coupon.min_amount|escape}</td>
            <td class="table-center">{if $coupon.if_issue|escape eq '1'}{$lang.announcing}{else}{$lang.not_announce}{/if}</td>
            <td class="table-center">{$coupon.start_time|date:Y-m-d}</td>
            <td class="table-center">{$coupon.end_time|date:Y-m-d}</td>
            <td class="table-center"><!--{if $coupon.mall_recommended}--><img src="templates/style/images/positive_enabled.gif" ectype="inline_edit" fieldname="mall_recommended" fieldid="{$coupon.coupon_id}" fieldvalue="1" title="{$lang.editable}"/><!--{else}--><img src="templates/style/images/positive_disabled.gif" ectype="inline_edit" fieldname="mall_recommended" fieldid="{$coupon.coupon_id}" fieldvalue="0" title="{$lang.editable}"/><!--{/if}--></td>
            <td class="handler">
                <a href="javascript:drop_confirm('{$lang.drop_confirm}', 'index.php?app=coupon&amp;act=drop&amp;id={$coupon.coupon_id}');">{$lang.drop}</a>
                <a href="{$site_url}/index.php?app=coupon&amp;act=view&amp;id={$coupon.coupon_id}" target="_blank">{$lang.view}</a>
            </td>
        </tr>
        <!--{foreachelse}-->
        <tr class="no_data">
            <td colspan="12">{$lang.no_data}</td>
        </tr>
        <!--{/foreach}-->
    </table>
    <!--{if $coupon_list}-->
    <div id="dataFuncs">
        <div class="pageLinks">{include file=page.bottom.html}</div>
    </div>
    <div class="clear"></div>
    <!--{/if}-->

</div>
{include file="footer.html"}